From 885aa947cfa919231537d45af918a151b7934949 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Fri, 14 Oct 2011 14:34:15 +0200 Subject: [PATCH] x86/MSI: drop local cpumask_t variable from msi_compose_msg() The function gets called only during initialization/resume (when no other CPUs are running) or with the IRQ descriptor lock held, so there's no way for the CPU mask to change under its feet. Signed-off-by: Jan Beulich Acked-by: Keir Fraser --- xen/arch/x86/msi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c index f75ab3211d..9c39053353 100644 --- a/xen/arch/x86/msi.c +++ b/xen/arch/x86/msi.c @@ -123,18 +123,16 @@ static void msix_put_fixmap(struct pci_dev *dev, int idx) void msi_compose_msg(struct irq_desc *desc, struct msi_msg *msg) { unsigned dest; - cpumask_t domain; struct irq_cfg *cfg = desc->chip_data; int vector = cfg->vector; - domain = cfg->cpu_mask; - if ( cpus_empty( domain ) ) { + if ( cpus_empty(cfg->cpu_mask) ) { dprintk(XENLOG_ERR,"%s, compose msi message error!!\n", __func__); - return; + return; } if ( vector ) { - dest = cpu_mask_to_apicid(&domain); + dest = cpu_mask_to_apicid(&cfg->cpu_mask); msg->address_hi = MSI_ADDR_BASE_HI; msg->address_lo = -- 2.30.2